
<script type="text/javascript">
	function getXMLHTTPRequest() {
		try {
			req = new XMLHttpRequest();
		} catch (err1) {
			try {
				req = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (err2) {
				try {
					req = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (err3) {
					req = false;
				}
			}
		}
		return req;
	}

	var http = getXMLHTTPRequest();

	function getListEmp() {
		var myurl = '/GoodHealth-web/getListUser';

		http.open("GET", myurl, true);
		http.onreadystatechange = useHttpResponse;
		http.send(null);
	}

	function useHttpResponse() {
		if (http.readyState == 4) {
			if (http.status == 200) {
				document.getElementById('tabs-2').innerHTML = http.responseText;
			}
		} else {
			document.getElementById('tabs-2').innerHTML = 'doi chut...';
		}
	}
</script>
<script type="text/javascript" src="../js/plug-in/jquery.tablesorter.txt"></script>
<script src="../js/ui/jquery.ui.tabs.js"></script>
<script type="text/javascript">
	$("#accordion").accordion({
		active : 1
	});
</script>
<script>
	$(function() {
		$("#tabs").tabs();
	});

	$(document).ready(function() {
		$("#myTable").tablesorter();
	});
</script>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<div id="main-tab">
  <div id="tabs">
    <ul>
      <li><a href="#tabs-1">Create User</a></li>
      <li><a href="#tabs-2" onClick="getListEmp()">List User</a></li>
      <li><a href="#tabs-3">Search</a></li>
      <li class="title">User Manager</li>
    </ul>
    <div id="tabs-1">
      <html:form action="/useraction.do" method="post">
        <table>
          <tr>
            <td>idUser</td>
            <td><html:text property="idUser"></html:text>
            <td>
          </tr>
          <tr>
            <td>Password</td>
            <td><html:text property="password"></html:text>
            <td>
          </tr>
          <tr>
            <td><html:submit value="Add"></html:submit></td>
            <td><input type=submit name=btnCancel value=Cancel />
            <td>
          </tr>
        </table>
      </html:form>
    </div>
    <div id="tabs-2"></div>
    <div id="tabs-3">Search</div>
  </div>
</div>
